package com.chao.c.controller;


import com.chao.c.dto.Student;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
 * @author Luck Chao
 * @Date: 2021/12/07
 */
@Slf4j
@RequestMapping(value = "/c")
@RestController
public class WebController {

    @GetMapping(value = "/index")
    public String index() {
        log.info(">>>>>>>>>>> index >>>>>>");
        return "Hello World !!";
    }

    @PostMapping(value = "/1")
    public String index1(@RequestBody String input) {
        log.info(">>>>>>>>>>> service C receive param: {}", input);
        return "Hello World :" + input;
    }

    @PostMapping(value = "/2")
    public String index2(@RequestBody Student stu) {
        log.info(">>>>>>>>>>> service C receive param: {}", stu);
        return "Hello World !!";
    }



}
